/** 报警信息 */
import { Get, Post } from './request';

export interface IAlarm {
    areaId: number,
    createDate: string,
    id: number,
    areaName: string,
    liftingId: number,
    msg: string, // "上升异常"
    status: number, // 0
    type: number, // 1
    videoSize: number,
    videoUrl: string,
}
export enum AlarmTypes  {
    '升降同步性异常',
    '升降操作异常',
    '上升或下降异常',
    '到位检测异常',
    '碰撞异常',
    '电机电流异常',
}
/** 获取全部报警信息
 * areaId
 */
export const getAllAlarms = (params?: any): Promise<IAlarm[]> => Get('/abnormalalarm/search', params)
/** 获取报警信息
 * 
 */
export const getAbornomalList = (params?: any) => Get('/abnormalalarm/list', params)

/** 报警信息异常复核
 * id
 * status 0 -1忽略 1确认
 */
export const checkAlarmApi = (params: any) => Post('/abnormalalarm/check', params)
